package core.mountedWeapons;

import core.Player;
import core.weapons.Missile;

public class Howitzer extends MountedWeapon {
	public Howitzer(){
		ammo=5;
		maxAmmo=5;
		cooldown=30;
	}
	
	@Override
	public void fire(int startX, int startY, double dir, Player p){
		double accuracy = 0.5;
		double dirMod = Math.random()*accuracy;
		p.main.attacks.add(new Missile(startX, startY, p, dir-accuracy/2+dirMod));
		cooldownTimer=cooldown;
		ammo--;
	}
}